/*
 * @: 
 * @Version: 1.0
 * @Autor: ziwei
 * @Date: 2021-11-01 10:41:45
 * @LastEditors: ziwei
 * @LastEditTime: 2021-11-01 10:56:49
 */
function logger({getState,dispatch}) {
  return function(next) {//调用下一个中间件 next=store，原始的dispatch方法
    return function(action) {//这个就是改造后的dispatch
      console.log("pre state",getState());
      next(action)
      console.log("next state",getState());
    }
  }
}

export default logger